1. Field of the Invention
The invention relates to a technique, specifically a method, apparatus, and article of manufacture that implements the method, to search for a specific object in an Interactive System Productivity Facility (ISPF) panel for automated testing.
2. Description of the Related Art
The IBM® (Registered trademark of International Business Machines Corporation) Interactive System Productivity Facility provides an interface and supporting programs that allows a user to configure and manage its system and application programs, and to access datasets. A dataset is also referred to as a file. The ISPF operates in an IBM z/OS® (Registered trademark of International Business Machines Corporation) operating system environment.
The ISPF provides a graphical user interface comprising ISPF panels. ISPF panels are character-based. An ISPF panel appears as a window and has rows and columns. A particular location within the ISPF panel is specified by its column and row number. The uppermost left corner of the ISPF panel is designated as column one, row one. The column numbers increase towards the right side of the ISPF panel, and the row numbers increase towards the bottom of the ISPF panel. Each location in an ISPF panel can display or receive a character depending on how the ISPF panel is configured.
During automated testing of a software product that uses ISPF panels, sometimes a desired object is in a list of objects. For example, the objects in the list may comprise objects from a database table or the objects may be a list of the column names of a database table. Often, the list of objects exceeds the number of rows which can be displayed on the ISPF panel. In other words, only a subset of objects of the list may be able to be displayed in the ISPF panel. Therefore, the list of objects may be manually scrolled to find a desired object.
A software tester application is a computer program that is used to test a software product. The software tester application uses keystroke capture techniques to record keystrokes from a user to generate a test script. To test the ISPF panel, the software tester application replays the keystrokes from the test script. However, if the ISPF panel is changed, for example, the position of a desired object in the scrollable list changes, the keystrokes need to be re-executed to manually regenerate the test script. Manually generating a test script is time consuming and error prone.
In one software tester application, WinRunner® (Registered trademark of Mercury Interactive Corporation), a built-in function called “TE_find_text” can be used to search a specified region of an ISPF panel for a string. The format of the TE_find_text function is: TE_find_text(target-string, x-found-coordinate, y-found-coordinate, x1, y1, x2, y2). The target-string is the specified string or text that the TE_find_text function will search for. The region in the ISPF panel that will be searched is specified by x1, y1, x2 and y2, where x1 and y1 specify a starting column and row, respectively, and x2 and y2 specify an ending column and row, respectively. If the specified text is found, the TE_find_text function provides the column and row associated with the start of the text in the x-found-coordinate and y-found-coordinate, respectively. The TE_find_text function returns a “−1” in the x-found-coordinate and y-found coordinate if the specified text is not found.
Even if the TE_find_text function is used to find a target string in an ISPF panel, the scrollable list is not automatically searched to find the target string if the target string is not displayed.
Therefore, there is a need for a technique that can be called from an automated test script to find an object in a scrollable list in an ISPF panel. The technique should be able to automatically scroll through a list of objects to find the desired object.